{% extends "base.html" %}

{% block content %}
<h2>Rejestracja</h2>
{% if spec %}
<form action="/accounts/register/{{ spec.id }}/" method="post">
    <table>
        {{ form.as_table }}
        <tr>
            <td colspan=2><input id="submit" type="submit" value="rejestruj" /></td>
        </tr>
    </table>
    {% else %}
    <p>Wybierz kierunek</p>
    {% for fac in faculties %}
    <h3>{{ fac.full_name }}:</h3>
    <ul>
        {% for spec in fac.specialization_set.all %}
        <li><a href="/accounts/register/{{ spec.id }}/">{{ spec }}</a></li>
        {% endfor %}
    </ul>
    {% endfor %}
{% endif %}
{% endblock %}

